<%@page import="com.kaishengit.entity.Product"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@include file="checkuser.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  	<title>商品列表页面</title>
  	<link href="style/bootstrap.min.css" rel="stylesheet">
    <style type="text/css">
    	body{
    		padding-top:70px;
    	}
    </style>

  </head>
  
  <body>
  	<div class="topbar" data-dropdown="dropdown">
		<div class="topbar-inner">
			<div class="container">
				<h3>
					<a href="#">ATM网上银行存款系统</a>
				</h3>
				<ul class="nav secondary-nav">
					<li class="dropdown">
						<a class="dropdown-toggle" href="#"><%=acc.getUsername() %></a>
						
					</li>
				</ul>
			</div>
		</div>
	</div>
	<div class="container">
		<a class="btn primary" href="product.jspx?task=save">添加新商品</a>
	  	<table class="zebra-striped">
	  		<thead>
		  		<tr>
					<th>商品名称</th>
					<th>价格</th>
					<th>&nbsp;</th>
		    	</tr>
	    	</thead>
	    	<tbody>
	    		<c:if test="${empty prodlist}">
	    			<tr>
	    				<td colspan="3">暂时没有数据！！</td>
	    			</tr>
	    		</c:if>
	    		<c:forEach items="${prodlist}" var="pro">
	    	 		<tr>
		   				<td>${pro.prodName}</td>
		   				<td>￥${pro.price}</td>
		   				<td>
		   					<a href="product.jspx?task=addcar&id=${pro.id}">放入购物车</a>
		   					<a href="product.jspx?task=edit&id=${pro.id }">修改商品</a>
							<a href="product.jspx?task=del&id=${pro.id }">删除</a>
		   				</td>
	   				</tr>
	    		</c:forEach>
	    	</tbody>
	  	</table>
	  	<div class="pagination">
			 <ul>
			     <li class="prev disabled"><a href="#">首页</a></li>
			     <li><a href="">上一页</a></li>
			     <li><a href="">下一页</a></li>
			     <li class="next"><a href="#">尾页</a></li>
			 </ul>
		</div>
    </div>
  </body>
</html>
